<extend name="Common/panel-block"/>
<block name="body">
    <form action="{:U()}" method="post" class="layui-form layui-clear" ajaxSubmit>
        <icy8:formItem label="数据">
            {~W('Widget/Form/num', 'name=test&class=layui-input&other=placeholder="哈哈"')}
        </icy8:formItem>
        <icy8:formItem label="字符串">
            {~W('Widget/Form/string', 'name=test&class=layui-input&other=placeholder="哈哈"')}
        </icy8:formItem>
        <icy8:formItem label="密码框">
            {~W('Widget/Form/password', 'name=test&class=layui-input&other=placeholder="哈哈"')}
        </icy8:formItem>
        <icy8:formItem label="文本框">
            {~W('Widget/Form/textarea', 'name=test&class=layui-textarea&other=placeholder="哈哈"')}
        </icy8:formItem>
        <icy8:formItem label="日期框">
            {~W('Widget/Form/datetime', 'name=test&class=layui-input&other=placeholder="哈哈"')}
        </icy8:formItem>
        <icy8:formItem label="下拉框">
            <php>
                $arr = array(
                    '1'=>'测试1',
                    '2'=>'测试2',
                    '3'=>'测试3',
                );
                $value = 3;
            </php>
            {~W('Widget/Form/select', array('name'=>'test', 'options'=>$arr, 'value'=>$value))}
        </icy8:formItem>
        <icy8:formItem label="单选框">
            {~W('Widget/Form/radio', array('name'=>'test', 'options'=>$arr, 'value'=>$value))}
        </icy8:formItem>
        <icy8:formItem label="复选框">
            {~W('Widget/Form/checkbox', array('name'=>'test', 'options'=>$arr, 'value'=>'3,1'))}
        </icy8:formItem>
        <icy8:formItem label="编辑器">
            {~W('Widget/Form/editor', 'name=test&value=哈哈&tool=simple')}
        </icy8:formItem>
        <icy8:formItem label="编辑器">
            {~W('Widget/Form/editor', 'name=guest&value=哈哈&tool=guest')}
        </icy8:formItem>
        <icy8:formItem label="编辑器">
            {~W('Widget/Form/editor', 'name=full&value=哈哈')}
        </icy8:formItem>

        <icy8:formItem label="">
            <input type="hidden" name="id" value="{$info.id}"/>
            <input type="hidden" name="model_id" value="{$model_id}"/>
            <icy8:button title="保存"/>
            <icy8:button title="返回" click="window.history.go(-1);" btnType="primary" type="button"/>
        </icy8:formItem>
    </form>
</block>
<block name="script">
    <script type="text/javascript">
        $(function () {
        })
    </script>
</block>